package com.buaa.xxx0320;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

/**
 * Created by Administrator on 2016/3/24.
 */
public class XXXOpenHelper extends SQLiteOpenHelper {

    public XXXOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context,name,factory,version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String ddl = "create table users(_id integer primary key autoincrement, uname text)";
        db.execSQL(ddl);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        Log.i("xxx", oldVersion +"............."+newVersion);
    }
}
